import request from '@/utils/request'

// 查询区县概况信息列表
export function getAllCountiesCondition(query) {
  return request({
    url: '/fxfzypg/baseData/getAllCountiesCondition',
    method: 'get',
    params: query
  })
}
// 查询乡镇概况信息列表
export function getAllVillageTownCondition(query) {
  return request({
    url: '/fxfzypg/baseData/villageTown/getAllVillageTownCondition',
    method: 'get',
    params: query
  })
}

// 根据ID查询区县概况详细信息
export function getCountiesCondition(id) {
  return request({
    url: '/fxfzypg/baseData/getCountiesCondition?id=' + id,
    method: 'get'
  })
}
// 根据ID查询乡镇概况详细信息
export function getVillageTownCondition(id) {
  return request({
    url: '/fxfzypg/baseData/villageTown/getVillageTownCondition?id=' + id,
    method: 'get'
  })
}

// 新增区县概况信息
export function saveCountiesCondition(data) {
  return request({
    url: '/fxfzypg/baseData/saveCountiesCondition',
    method: 'post',
    data: data
  })
}
// 新增乡镇概况信息
export function saveVillageTownCondition(data) {
  return request({
    url: '/fxfzypg/baseData/villageTown/saveVillageTownCondition',
    method: 'post',
    data: data
  })
}
// 修改区县概况信息
export function updateCountiesCondition(data) {
  return request({
    url: '/fxfzypg/baseData/updateCountiesCondition',
    method: 'post',
    data: data
  })
}
// 修改乡镇概况信息
export function updateVillageTownCondition(data) {
  return request({
    url: '/fxfzypg/baseData/villageTown/update',
    method: 'post',
    data: data
  })
}
// 删除区县概况信息
export function delCountiesCondition(id) {
  return request({
    url: '/fxfzypg/baseData/delCountiesCondition?id=' + id,
    method: 'post'
  })
}
// 删除乡镇概况信息
export function delVillageTownCondition(id) {
  return request({
    url: '/fxfzypg/baseData/villageTown/delete?id=' + id,
    method: 'post'
  })
}

// 覆盖区县概况信息
export function coverCountiesCondition(data) {
  return request({
    url: '/fxfzypg/baseData/coverConditions',
    method: 'post',
    data:data
  })
}

// 覆盖乡镇概况信息
export function coverVillageTownCondition(data) {
  return request({
    url: '/fxfzypg/baseData/villageTown/coverVillageTownCondition',
    method: 'post',
    data:data
  })
}